#!/usr/bin/make -f
include /usr/share/dpkg/default.mk
export QT_SELECT = qt5
VERSION = $(DEB_VERSION_UPSTREAM)
PACK_VER = $(shell echo $(VERSION) | awk -F'[+_~-]' '{print $$1}')
# Fix: invalid digit "8" in octal constant. e.g.  u008 ==> 008 ==> 8
BUILD_VER = $(shell echo $(VERSION) | awk -F'[+_~-]' '{print $$2}' | sed 's/[^0-9]//g' | awk '{print int($$1)}')

%:
	dh $@ --parallel

override_dh_auto_configure:
	dh_auto_configure -- -DBUILD_VERSION=$(BUILD_VER) -DVERSION=$(PACK_VER)

